package com.chenjj.java.rmi.naming;

import com.chenjj.java.business.order.OrderInfoVO;

import java.rmi.Naming;

public class NamingClient {
    public static void main(String[] args) {
        try {
            String remoteAddr="rmi://localhost:1100/HelloNaming";
            NamingService.HelloNamingFacade hello = (NamingService.HelloNamingFacade) Naming.lookup(remoteAddr);
            String response = hello.helloWorld("chenjj", new OrderInfoVO());
            System.out.println("=======> " + response + " <=======");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
